// 引入路由模块
import { Routes, Route, Navigate } from 'react-router-dom'
import { lazy } from 'react'
const Index = lazy(() => import('./pages/index'))
const Login = lazy(() => import('./pages/login'))
function App () {
  return (
    <div className='App'>
      {/* 路由出口 */}
      <Routes>
        {/* 首页 */}
        <Route path='/index/*' element={<Index></Index>}></Route>
        {/* 登录 */}
        <Route path='/login' element={<Login></Login>}></Route>
        {/* 一级路由重定向 */}
        <Route path='*' element={<Navigate to='/index'></Navigate>}></Route>
      </Routes>
    </div>
  )
}

export default App
